Problem: Let $\omega$ be a nonreal root of $z^3 = 1.$  Find the number of ordered pairs $(a,b)$ of integers such that $|a \omega + b| = 1.$
Solution: We have that $z^3 - 1 = 0,$ which factors as $(z - 1)(z^2 + z + 1) = 0.$  Since $\omega$ is not real, $\omega$ satisfies
\[\omega^2 + \omega + 1 = 0.\]By the quadratic formula,
\[\omega = \frac{-1 \pm i \sqrt{3}}{2}.\]Let $\omega = \frac{-1 + i \sqrt{3}}{2}.$  Then $|a \omega + b|^2 = 1.$  Also,
\begin{align*}
|a \omega + b|^2 &= \left| a \cdot \frac{-1 + i \sqrt{3}}{2} + b \right|^2 \\
&= \left| -\frac{1}{2} a + b + \frac{\sqrt{3}}{2} ai \right|^2 \\
&= \left( -\frac{1}{2} a + b \right)^2 + \left( \frac{\sqrt{3}}{2} a \right)^2 \\
&= \frac{1}{4} a^2 - ab + b^2 + \frac{3}{4} a^2 \\
&= a^2 - ab + b^2.
\end{align*}Thus, we want to find integers $a$ and $b$ so that $a^2 - ab + b^2 = 1.$  Note that we derived this equation from the equation
\[\left( -\frac{1}{2} a + b \right)^2 + \left( \frac{\sqrt{3}}{2} a \right)^2 = 1.\]Then
\[\left( \frac{\sqrt{3}}{2} a \right)^2 \le 1,\]so
\[\left| \frac{\sqrt{3}}{2} a \right| \le 1.\]Then
\[|a| \le \frac{2}{\sqrt{3}} < 2,\]so the only possible values of $a$ are $-1,$ $0,$ and $1.$

If $a = -1,$ then the equation $a^2 - ab + b^2 = 1$ becomes
\[b^2 + b = 0.\]The solutions are $b = -1$ and $b = 0.$

If $a = 0,$ then the equation $a^2 - ab + b^2 = 1$ becomes
\[b^2 = 1.\]The solutions are $b = -1$ and $b = 1.$

If $a = 1,$ then the equation $a^2 - ab + b^2 = 1$ becomes
\[b^2 - b = 0.\]The solutions are $b = 0$ and $b = 1.$

Therefore, the possible pairs $(a,b)$ are $(-1,-1),$ $(-1,0),$ $(0,-1),$ $(0,1),$ $(1,0),$ and $(1,1).$

We went with the value $\omega = \frac{-1 + i \sqrt{3}}{2}.$  The other possible value of $\omega$ is
\[\frac{-1 - i \sqrt{3}}{2} = 1 - \omega,\]so any number that can be represented in the form $a \omega + b$ can also be represented in this form with the other value of $\omega.$  (In other words, it doesn't which value of $\omega$ we use.)

Hence, there are $\boxed{6}$ possible pairs $(a,b).$

Note that the complex numbers of the form $a \omega + b$ form a triangular lattice in the complex plane.  This makes it clear why there are six complex numbers that have absolute value 1.

[asy]
unitsize(1 cm);

int i, j;
pair Z;

draw(Circle((0,0),1),red);
draw((-3,0)--(3,0));
draw((0,-3)--(0,3));

for (i = -20; i <= 20; ++i) {
for (j = -20; j <= 20; ++j) {
  Z = (i,0) + j*dir(120);
	if (abs(Z.x) <= 3.1 && abs(Z.y) <= 3.1) {dot(Z);}
}}
[/asy]